import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/login.vue'
import HomePage from '@/views/homepage'
import HouSing from '@/views/housing'
import Layou from '@/views/layou'
import Advice from '@/views/advice'
import My from '@/views/my'
import Cities from '@/views/cities'

Vue.use(VueRouter)


// Vue.use(Router)

export default new VueRouter({
  routes:[
    {
      path:'/login',
      component:Login,
    },
    {
      path:'/',
      redirect:'/login'
    },
    {
      path:'/layou/:token',
      component:Layou,
      children:[
        {
          path:'/layou/housing',
          component:HouSing,
        },
        {
          path:'/layou/homepage',
          component:HomePage,
        },
        {
          path:'/layou/Cities',
          component:Cities
        },
        {
          path:'/layou/advice',
          component:Advice
        },
        {
          path:'/layou/my',
          component:My
        },
      ]
    }
  ]
})